﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DataAccess;
using DataAccess.Entities;

namespace Portal
{
    public partial class OrgUpdate : System.Web.UI.Page
    {
        private int id;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack) return;

            if (Request.Params.AllKeys.Contains("Id"))
                int.TryParse(Request["Id"], out id);

            Organization org;
            using (var db = new CompanyDicContext())
            {
                org = db.Organizations.Where(p => p.Id == id).FirstOrDefault();
            }

            lblPageTitle.Text = org.Name;
        }

        private void InitDropDownList()
        {
            
        }

        protected void btnSubmit_Click(object sender, EventArgs e)
        {
        }
    }
}